<%@page contentType="text/html; charset=utf-8"%>
<%@ include file="../inc/TagLibs.jsp"%>
<c:set var="pageTitle" value="选择部门" />
<%@ include file="../inc/Title.jsp"%>
<head>
<link rel="stylesheet" type="text/css" href="/css/base.css" />
<link href="/css/dtree.css" rel="stylesheet" type="text/css">
<script src="/js/dtree.js"></script>
<script language="javascript">
	function doTreeNodeClick(id,name){
		var arr=new Array(id,name);
		parent.popRetVal=arr;
		parent.ClosePop();
	}
	function doCancel(){
		parent.ClosePop();
	}
	function doInit(){

	}
</script>
</head>
<body oncontextmenu="return false" onload="doInit();"  scroll="no" class="sheet">
<div class="sheet-main" style="width:280px">
  <div class="sheet-top">
    <div class="content">
      <h2>选择部门</h2>
      <p>鼠标单击可以选中记录</p>
    </div>
  </div>
	<div class="sheet-list">
			  <div align="left" style="height:350px;width:280px;background:#eafaff;OVERFLOW-Y:auto;OVERFLOW-X:hidden;" >					
				<div class="blank12"></div>
						<script language="javascript">
							<!--
							var isOpen=false;
							var d = new dTree('d','/images/dtree');
							
							d.config.useCookies=false;
							d.config.useLines=true;
							d.config.useIcons=true;
							
							d.add(0,-1,'Root');
							<c:forEach var="item" items="${departmentList}">
								d.add(${item.id},${item.parentId},'<c:out value="${item.departmentName}" />',"javascript:doTreeNodeClick('${item.id}','${item.departmentName}');",'','','',false);
							</c:forEach>
							
							document.write(d);
							d.openAll();
							//-->
						</script>
			  </div>
		</div>
</div>	
</body>
</html>